<div class="exposition-view exposition-page">
    <div class="exposition-image">
        {assign var="expositionImage" value=UploadImageFacade::resolveImagePath($model->picture_src, "270x255")}
        <img src="{$expositionImage}" />
    </div>
    <div class="exposition-info">
        <h2>{$model->name}</h2>
        <div class="exposition-dates">
            <p>С <b>{$model->from_date|date_format:"%e.%m.%Y"}</b></p>
            <p>По <b>{$model->to_date|date_format:"%e.%m.%Y"}</b></p>
        </div>
        <div class="exposition-location">
            <p>Страна: <b>{$model->country}</b></p>
            <p>Город: <b>{$model->city}</b></p>
            <p>Адрес: <b>{$model->address}</b></p>
        </div>
        <div class="exposition-descr">
            <p>{$model->describe}</p>
        </div>
        <div class="contact-person">
            <p>Контактное лицо:</p>
            <div class="person-avatar">
                {assign var="userAvatar" value=UploadImageFacade::resolveImagePath($author->avatar_id, "50x75")}
                <img src="{$userAvatar}" />
            </div>
            <div class="person-info">
                <a href="/user/{$author->user_id}">{$author->surname} {$author->name}</a>
                <p style="margin-top: 15px;">{$author->city}</p>
                <p>{$author->mobile_phone}</p>
            </div>
        </div>
        <div style="clear: both;"></div>
        {if (!ExpositionFacade::isAlreadyGo($user->user_id, $model->exposition_id) && !Yii::app()->user->isGuest)}
        <a style="float: left; margin-right: 35px; font-size: 16px;" href="/exposition/go/{$model->exposition_id}">Хочу пойти</a>
        {/if}
        <p style="float: left; margin-right: 35px;">Уже идут: {$expositionMembersCount}</p>
    </div>
    
    <div style="clear: both;"></div>

    {if ($expositionMembersCount > 0)}
    <div class="exposition-members">
        <p><b>Желающие пойти:</b> всего {$expositionMembersCount}</p>
        <div class="members-list">
            {foreach from=$expositionMembers item=expositionMember}
            {assign var="member" value=UserFacade::getUserById($expositionMember->user_id)}
            {assign var="avatarSrc" value=UploadImageFacade::resolveImagePath($member->avatar_id, "84x123")}
                <div class="member">
                    <a href="/user/{$member->user_id}"><img src="{$avatarSrc}" alt="" /></a><br />
                    <a href="/user/{$member->user_id}">{$member->name}<br /> {$member->surname}</a>
                </div>
            {/foreach}
        </div>
    </div>
    {/if}
    {if ($isOwner)}
    <div class="exposition-actions">
        <a href="/exposition/addphoto/{$model->exposition_id}">Загрузить логотип</a>
        <a href="/exposition/edit/{$model->exposition_id}">Редактировать</a>
        <a class="del" href="/exposition/delete/{$model->exposition_id}">Удалить</a>        
    </div>
    {/if}
</div>